package com.glory.wxelectricitypda.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.wxelectricitypda.R;
import com.glory.wxelectricitypda.bean.MatEntity;

import java.util.List;


public class MatListAdapter extends BaseQuickAdapter<MatEntity, BaseViewHolder> {
    public MatListAdapter(@Nullable List<MatEntity> data) {
        super(R.layout.adapter_mat_list, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MatEntity item) {
        helper.setText(R.id.tvPosition,String.valueOf(helper.getAdapterPosition() + 1));
        helper.setText(R.id.tvmLotid,item.getMATERIALDESC());
        helper.setText(R.id.tvLotId,item.getMLOTID());
        helper.setText(R.id.tvLOCID,item.getTRANSSTORAGEID());
        helper.setText(R.id.tvQty,String.valueOf(item.getMAINQTY()));

    }
}
